package com.icode.gulimall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author: my_code
 * @Email: my_code@foxmail.com
 * @Create: 2021-01-03 16:33
 */
@Data
public class UserRegistVo {

    @NotNull(message = "用户名必须提交")
    @Length(min = 6,max = 18,message = "用户名必须是6-18个字符")
    private String userName;
    @NotNull(message = "密码不能为空")
    @Length(min = 6,max = 12,message = "用户名密码必须是6-12位")
    private String password;
    @NotNull
    @Pattern(regexp = "^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$",message = "手机号格式错误")
    private String phone;
    @NotNull
    private String code;
}
